#!/usr/bin/env python3

import os
import subprocess
import socket
import sys
import time
from struct import *

import paho.mqtt.client as mqtt

if sys.version < '2.7':
    print("WARNING: SSL/TLS not supported on Python 2.6")
    exit(0)

rc = 1
mqttc = mqtt.Client("08-ssl-bad-cacert")
try:
    mqttc.tls_set("this/file/doesnt/exist")
except IOError as err:
    rc = 0

exit(rc)
